using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using FytSoa.Domain.Hr;
using SqlSugar;

namespace FytSoa.Application.Hr;

/// <summary>
/// 知识库
/// </summary>
public class HrKnowledgeDto : AppEntity
{
    /// <summary>
    /// 标题
    /// </summary>
    [Required]
    [StringLength(100)]
    public string Title { get; set; }

    /// <summary>
    /// 分类编号
    /// </summary>
    [Required]
    public long CategoryId { get; set; }
    
    /// <summary>
    /// 分类
    /// </summary>
    public HrKnowledge.Category CategoryObj { get; set; }

    /// <summary>
    /// 是否公开
    /// </summary>
    [Required]
    public bool IsPublic { get; set; } = false;

    /// <summary>
    /// 阅读数
    /// </summary>
    [Required]
    public int ReadCount { get; set; } = 0;

    /// <summary>
    /// 描述
    /// </summary>
    public string Summary { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string UpdateUser { get; set; }


}